<c:if test="${actionBean.geocodeSet}">
        
    <div id="mapLightbox" style="display: none;">
        <div id="mapContainer">
            <div class="closeButton">
                <a href="javascript:closeMap()">Close</a>
            </div>
            <div class="clear"></div>
            <div id="map"></div>
            <p><c:out value="${actionBean.formattedAddress}" default=""/></p>
        </div>
    </div>
    
    <script src="${pageContext.request.contextPath}/js/application.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        //<![CDATA[
        function loadScript() {
            if(!mapLibraryLoaded) {
                var script = document.createElement("script");
                script.type = "text/javascript";
                script.src = "http://maps.google.com/maps?file=api&v=2&key=${actionBean.geocodeApiKey}&async=2&callback=loadMap";
                document.body.appendChild(script);
                mapLibraryLoaded = true;
            } else {
                loadMap();
            }
        }
    
        function displayMap() {
            var map = new GMap2(document.getElementById("map"));
            map.addControl(new GLargeMapControl());
            map.addControl(new GMapTypeControl());
            map.setCenter(new GLatLng(${actionBean.geocode.latitude},${actionBean.geocode.longitude}),16);

            var point = new GLatLng(${actionBean.geocode.latitude},${actionBean.geocode.longitude});
            var marker = createMarker(point,'${actionBean.htmlAddress}');
            map.addOverlay(marker);
            
            map.addControl(new GOverviewMapControl(new GSize(200,200)));
            setTimeout("positionOverview(558,0)",1);
        }
        //]]> 
    </script>
</c:if>
